//
//  LBBall.h
//  LittleBall
//
//  Created by yy on 11-11-27.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LBPropertiesCommon.h"

#define DATA_KEY_NAME_PROPERTYTYPE @"propertyType"
#define DATA_KEY_NAME_PROPERTYLEVEL @"propertyLevel"
#define DATA_KEY_NAME_PROPERTYNUM @"propertyNum"
#define DATA_KEY_NAME_PROPERTYVALUE @"propertyValue"

@interface LBPropertyUnit : NSObject <NSCoding>
{
    UIImageView           *m_backgroundImageView; // 道具单元背景 // coding 时记nil
    UIImageView           *m_propertyImageView; // 道具单元前景 // coding 时记nil
    UILabel               *m_levelLable; // 道具级别标签 // coding 时记nil
    UILabel               *m_numLable; // 道具个数标签 // coding 时记nil
    UIButton              *m_buyButton; // 道具即时购买按钮 // coding 时记nil
    
    LB_PROPERTY_TYPE      m_propertyType;
    int                   m_propertyLevel;
    int                   m_propertyNum;
    int                   m_propertyValue; // 道具单价
    CGPoint               m_centerPoint;
}


- (void)encodeWithCoder:(NSCoder *)encoder;
- (id)initWithCoder:(NSCoder *)decoder;

- (id)initWithType:(LB_PROPERTY_TYPE)type Level:(int)level Number:(int)number Value:(int)value;


@property (retain) UIImageView *m_backgroundImageView;
@property (retain) UIImageView *m_propertyImageView;
@property (retain) UILabel *m_levelLable;
@property (retain) UILabel *m_numLable;
@property (retain) UIButton *m_buyButton;
@property LB_PROPERTY_TYPE m_propertyType;
@property int m_propertyLevel;
@property int m_propertyNum;
@property int m_propertyValue;
@property CGPoint m_centerPoint;

@end